on Stopped
Called when the serial port has been stopped or closed.
This can occur due to an explicit request to close the port, an error condition (e.g., device disconnected), or during system shutdown. After this callback, no further data will be received from this port, and attempts to send data may fail until the port is successfully reopened and onReady is called again.
Implementers should use this callback to clean up any resources associated with the active serial connection for this port.